Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls


<ToolboxData("<{0}:WebPartClientside runat=server></{0}:WebPartClientside>")> _
Public Class WebPartClientside
    Inherits System.Web.UI.WebControls.WebParts.WebPart

    Public Overrides ReadOnly Property Verbs() As _
             System.Web.UI.WebControls.WebParts.WebPartVerbCollection
        Get
            Dim vrbEnglish As New WebControls.WebParts.WebPartVerb( _
                                                   "EnglishChoice", "ImplementEnglish")
            Dim vrbFrench As New WebControls.WebParts.WebPartVerb( _
                                                   "FrenchChoice", "ImplementFrench")

            vrbEnglish.Text = "English"
            vrbFrench.Text = "French"

            Dim vrbsLanguage(1) As WebControls.WebParts.WebPartVerb
            vrbsLanguage(0) = vrbFrench
            vrbsLanguage(1) = vrbEnglish

            Dim vrbs As WebControls.WebParts.WebPartVerbCollection
            vrbs = New WebControls.WebParts.WebPartVerbCollection(vrbsLanguage)

            Return vrbs

        End Get

    End Property

    Protected Overrides Sub CreateChildControls()
        Dim strImplementFrench As String = _
     "function ImplementFrench(){...clientside code...;}"
        Dim strImplementEnglish As String = _
             "function ImplementEnglish(){...clientside code...;}"
        Dim csm As ClientScriptManager

        csm = Me.Page.ClientScript

        csm.RegisterClientScriptBlock(Me.GetType, "ImpFrench", strImplementFrench, True)
        csm.RegisterClientScriptBlock(Me.GetType, "ImpEng", strImplementEnglish, True)


    End Sub
    
End Class
